#include <iostream>
#include <string>
#include <bits/stdc++.h>
using namespace std;
const int  N = 100;
string b[N];
int index_b;

int main(){
    string a;
    getline(cin,a);
    for(int i = 0; i < a.length(); ++i){
        if(a[i] == ' ') ++index_b;
        else b[index_b] += a[i]; 
    }

    for(int i = index_b; i >= 0; --i){
        cout << b[i];
        if(i != 0){
            cout << " ";
        }
    }
    return 0;
}
